package com.Cychat.commons.feign;

import com.Cychat.commons.entity.ResultMessage;
import com.Cychat.commons.entity.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Auther: 谢宝辉  <br/>
 * Date: 2025/11/6:15:45  <br/>
 * Description: 商城服务Feign接口
 */
@FeignClient(name = "Cychat-Java-mall", path = "/api/mall")
public interface MallFeignService {

    // 获取商品列表
    @GetMapping("/product/list")
    ResultMessage<List<Product>> list(@RequestParam(value = "categoryId", required = false) Integer categoryId);

    // 获取商品分类列表
    @GetMapping("/productCategory/list")
    ResultMessage<List<String>> list();
}
